package com.chc.web.fee_water.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chc.web.fee_power.entity.FeePower;
import com.chc.web.fee_power.entity.FeePowerParm;
import com.chc.web.fee_water.entity.FeeWater;
import com.chc.web.fee_water.entity.FeeWaterParm;
import com.chc.web.fee_water.mapper.FeeWaterMapper;
import com.chc.web.fee_water.service.FeeWaterService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/01/18/15:09
 * @Description:
 */

@Service
public class FeeWaterServiceImpl extends ServiceImpl<FeeWaterMapper, FeeWater> implements FeeWaterService {

    @Override
    public IPage<FeeWater> getList(FeeWaterParm feeWaterParm) {
        //构造分页对象
        IPage<FeeWater> page = new Page<>();
        page.setCurrent(feeWaterParm.getCurrentPage());
        page.setPages(feeWaterParm.getPageSize());
        return baseMapper.getList(page,feeWaterParm.getUserName(),feeWaterParm.getHouseNum());
    }

    @Override
    public List<FeeWater> getListWater(Long houseId) {
        return this.baseMapper.getListWater(houseId);
    }
}
